package cn.jx.asc.pojo.entity;

import cn.jx.asc.common.annonation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author lhg
 * @since 2021-06-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_user")
@ApiModel(value="User对象", description="")
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    private String id;

    @Excel(name = "用户密码")
    private String username;

    @Excel(name = "真实姓名")
    private String realname;

    private String password;

    @Excel(name = "电话")
    private String telephone;

    private String profilePhoto;

    private String email;
    @Excel(name = "性别")
    private Integer sex;

    @Excel(name = "年龄")
    private Integer age;

    private Integer statu;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    @TableField( fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }
}
